﻿using System;
using System.Web.UI;
using WFC.WebSite.Views;

namespace WFC.WebSite.Pages.Shared
{
    public partial class CmsHtmlControl : UserControl, ICmsHtmlControlView
    {

        #region Fields

        private CmsHtmlControlPresenter Presenter { get; set; }

        public int ContentId
        {
            get { return Convert.ToInt32(Request.QueryString[CONTENT_ID]); }
        }

        public string HtmlContent
        {
            get { return TextBoxControl.Text; }
            set { LiteralControl.Text = value; }
        }

        public event EventHandler OnControllerLoad;

        #endregion

        #region Events

        protected void Page_Init(object sender, EventArgs e)
        {
            Presenter = new CmsHtmlControlPresenter(this);
            Page.Load += OnControllerLoad;
        }

        #endregion

    }
}